import Vue from 'vue'
import Vuex from 'vuex'
import todo from './modules/todo'
import createPersistedState from 'vuex-persistedstate'
Vue.use(Vuex)
export default new Vuex.Store({
  modules: {
    todo
  },
  plugins: [
    createPersistedState({
      key: 'todo-vuex',
      paths: ['todo.list'],
      storage: window.localStorage
    })
  ]
})
